<script type="text/javascript">
function isValidEmail(emailAddress) {
	   
    var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
 
    return pattern.test(emailAddress);
 
    }


function check1()
{
     var temp=0; 
	  if(jQuery("#jform_first_name").val()=='' || jQuery("#jform_first_name").val()=='...') 
	  { 
	    	 jQuery("#jform_first_name").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		  jQuery("#jform_first_name").attr('style','border:0px solid red');


	  if(jQuery("#jform_last_name").val()=='' || jQuery("#jform_last_name").val()=='...') 
	  { 
	    	 jQuery("#jform_last_name").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		  jQuery("#jform_last_name").attr('style','border:0px solid red');


	  if(jQuery("#jform_title").val()=='' || jQuery("#jform_title").val()=='...') 
	  { 
	    	 jQuery("#jform_title").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		  jQuery("#jform_title").attr('style','border:0px solid red');


	  if(jQuery("#jform_company").val()=='' || jQuery("#jform_company").val()=='...') 
	  { 
	    	 jQuery("#jform_company").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		  jQuery("#jform_company").attr('style','border:0px solid red');

	  	  

	  	  

	  if(!isValidEmail(jQuery("#jform_email1").val())) 
	  { 
	    	 jQuery("#jform_email1").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		jQuery("#jform_email1").attr('style','border:0px solid red');  


	  if(jQuery("#jform_phone").val()=='' || jQuery("#jform_phone").val()=='...') 
	  { 
	    	 jQuery("#jform_phone").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		jQuery("#jform_phone").attr('style','border:0px solid red');  


	  if(jQuery("#jform_industry").val()=='' || jQuery("#jform_industry").val()=='...') 
	  { 
	    	 jQuery("#jform_industry").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		jQuery("#jform_industry").attr('style','border:0px solid red');  


	  if(jQuery("#jform_estimate").val()=='' || jQuery("#jform_estimate").val()=='...') 
	  { 
	    	 jQuery("#jform_estimate").attr('style','border:1px solid red');
	    	 temp=1;
	    	 
	  }
	  else
		jQuery("#jform_estimate").attr('style','border:0px solid red');  	 
          		
	 
	  if(temp==0)
	   jQuery('#member-registration').submit();    
}
</script>
<?php 
$country_list = array(
		"Afghanistan",
		"Albania",
		"Algeria",
		"Andorra",
		"Angola",
		"Antigua and Barbuda",
		"Argentina",
		"Armenia",
		"Australia",
		"Austria",
		"Azerbaijan",
		"Bahamas",
		"Bahrain",
		"Bangladesh",
		"Barbados",
		"Belarus",
		"Belgium",
		"Belize",
		"Benin",
		"Bhutan",
		"Bolivia",
		"Bosnia and Herzegovina",
		"Botswana",
		"Brazil",
		"Brunei",
		"Bulgaria",
		"Burkina Faso",
		"Burundi",
		"Cambodia",
		"Cameroon",
		"Canada",
		"Cape Verde",
		"Central African Republic",
		"Chad",
		"Chile",
		"China",
		"Colombi",
		"Comoros",
		"Congo (Brazzaville)",
		"Congo",
		"Costa Rica",
		"Cote d'Ivoire",
		"Croatia",
		"Cuba",
		"Cyprus",
		"Czech Republic",
		"Denmark",
		"Djibouti",
		"Dominica",
		"Dominican Republic",
		"East Timor (Timor Timur)",
		"Ecuador",
		"Egypt",
		"El Salvador",
		"Equatorial Guinea",
		"Eritrea",
		"Estonia",
		"Ethiopia",
		"Fiji",
		"Finland",
		"France",
		"Gabon",
		"Gambia, The",
		"Georgia",
		"Germany",
		"Ghana",
		"Greece",
		"Grenada",
		"Guatemala",
		"Guinea",
		"Guinea-Bissau",
		"Guyana",
		"Haiti",
		"Honduras",
		"Hungary",
		"Iceland",
		"India",
		"Indonesia",
		"Iran",
		"Iraq",
		"Ireland",
		"Israel",
		"Italy",
		"Jamaica",
		"Japan",
		"Jordan",
		"Kazakhstan",
		"Kenya",
		"Kiribati",
		"Korea, North",
		"Korea, South",
		"Kuwait",
		"Kyrgyzstan",
		"Laos",
		"Latvia",
		"Lebanon",
		"Lesotho",
		"Liberia",
		"Libya",
		"Liechtenstein",
		"Lithuania",
		"Luxembourg",
		"Macedonia",
		"Madagascar",
		"Malawi",
		"Malaysia",
		"Maldives",
		"Mali",
		"Malta",
		"Marshall Islands",
		"Mauritania",
		"Mauritius",
		"Mexico",
		"Micronesia",
		"Moldova",
		"Monaco",
		"Mongolia",
		"Morocco",
		"Mozambique",
		"Myanmar",
		"Namibia",
		"Nauru",
		"Nepal",
		"Netherlands",
		"New Zealand",
		"Nicaragua",
		"Niger",
		"Nigeria",
		"Norway",
		"Oman",
		"Pakistan",
		"Palau",
		"Panama",
		"Papua New Guinea",
		"Paraguay",
		"Peru",
		"Philippines",
		"Poland",
		"Portugal",
		"Qatar",
		"Romania",
		"Russia",
		"Rwanda",
		"Saint Kitts and Nevis",
		"Saint Lucia",
		"Saint Vincent",
		"Samoa",
		"San Marino",
		"Sao Tome and Principe",
		"Saudi Arabia",
		"Senegal",
		"Serbia and Montenegro",
		"Seychelles",
		"Sierra Leone",
		"Singapore",
		"Slovakia",
		"Slovenia",
		"Solomon Islands",
		"Somalia",
		"South Africa",
		"Spain",
		"Sri Lanka",
		"Sudan",
		"Suriname",
		"Swaziland",
		"Sweden",
		"Switzerland",
		"Syria",
		"Taiwan",
		"Tajikistan",
		"Tanzania",
		"Thailand",
		"Togo",
		"Tonga",
		"Trinidad and Tobago",
		"Tunisia",
		"Turkey",
		"Turkmenistan",
		"Tuvalu",
		"Uganda",
		"Ukraine",
		"United Arab Emirates",
		"United Kingdom",
		"United States",
		"Uruguay",
		"Uzbekistan",
		"Vanuatu",
		"Vatican City",
		"Venezuela",
		"Vietnam",
		"Yemen",
		"Zambia",
		"Zimbabwe"
	);
$type=JRequest::getVar('type');
?>
<div class="tpl-form gradient-1 clearfix">
        	<form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate">

                            <div class="input-block ip-col-2">
                                <label for="">Firstname *</label>
                                <input type="text" class="f-input i-toggle required" value="..." name="jform[first_name]" id="jform_first_name">
                            </div>
                            <div class="input-block ip-col-2 col-last">
                                <label for="">Lastname *</label>
                                <input type="text" class="f-input i-toggle required" value="..."  name="jform[last_name]" id="jform_last_name">
                            </div>
                            <div class="input-block ip-col-2">
                                <label for="">Title *</label>
                                <input type="text" class="f-input i-toggle required" value="..."  name="jform[title]" id="jform_title">
                            </div>
                            <div class="input-block ip-col-2 col-last">
                                <label for="">Company *</label>
                                <input type="text" class="f-input i-toggle required" value="..."  name="jform[company]" id="jform_company">
                            </div>
                            <div class="input-block ip-col-2">
                                <label for="">E-mail *</label>
                                <input type="text" class="f-input i-toggle required" value="..." name="jform[email1]" id="jform_email1">
                            </div>
                            <div class="input-block ip-col-2 col-last">
                                <label for="">Phone no. *</label>
                                <input type="text" class="f-input i-toggle required" value="..." name="jform[phone]" id="jform_phone">
                            </div>
                            <div class="input-block ip-col-2">
                                <label for="">Country *</label>
                                <select class="f-select" name="jform[country]" id="jform_country">
                                    <?php for($i=0;$i<count($country_list);$i++){?>
                                    <option <?php if($country_list[$i]=="Denmark") echo "selected"?>><?php echo $country_list[$i]?></option>
                                    <?php }?>
                                </select>
                            </div>
                            <div class="input-block ip-col-2 col-last">
                                <label for="">State</label>
                                <input type="text" class="f-input i-toggle" value="..."  name="jform[status]" id="jform_status">
                            </div>
                            
                            <div class="input-block ip-col-2" style="display:none;">
                                <label for="">Password *</label>
                                <input  type="password" class="f-input i-toggle required" value="123456" name="jform[password1]" id="jform_password1" >
                            </div>
                            <div class="input-block ip-col-2 col-last" style="display:none;">
                                <label for="">Confirm Password *</label>
                                <input style="display:none;" type="password" class="f-input i-toggle required" value="123456" name="jform[password2]" id="jform_password2">
                            </div>
                            
                           <div class="input-block ip-col-2">
			                    <label for="">Industry *</label>
			                    <input type="text" class="f-input i-toggle" value="..." name="jform[industry]" id="jform_industry">
                           </div>
			                <div class="input-block ip-col-2 col-last">
			                    <label for="">Estimated # of IP nodes *</label>
			                    <input type="text" class="f-input i-toggle" value="..." name="jform[estimate]" id="jform_estimate">
			                </div>
                            
                            <div class="clr"></div>
                            <div class="input-block">
                                <label for="">Your message</label>
                                <textarea class="i-toggle" name="jform[message]" id="jform_message" >...</textarea>
                            </div>
                            <div class="clr"></div>
                            <div class="form-submit clearfix">
                                <a href="#" class="btnSubmit" onclick="check1();">Submit</a>
                                
                            </div>
                            <div>
			
			  <input type="hidden" value="dd" name="jform[name]" id="jform_name" >
			  <input type="hidden" value="dd" name="jform[username]" id="jform_username">
			  <input type="hidden" value="dd" name="donwload_trial">
			  
                           
			<input type="hidden" name="option" value="com_users" />
			<input type="hidden" name="task" value="registration.register" />
			<?php echo JHtml::_('form.token');?>
		</div>
                        </form>
                    </div>
                     <p id="p-field">* All fields are mandatory</p>